import request from '@/utils/request'

// 查询物资出库列表
export function listElecMaterialOutinfo(query) {
  return request({
    url: '/elec/elecMaterialOutinfo/list',
    method: 'get',
    params: query
  })
}

// 查询物资出库详细
export function getElecMaterialOutinfo(outId) {
  return request({
    url: '/elec/elecMaterialOutinfo/' + outId,
    method: 'get'
  })
}

// 查询照片
export function searchImg(query) {
  return request({
    url: '/elec/elecMaterialOutinfo/searchImg',
    method: 'get',
	params: query
  })
}

// 查询物资列表
export function listElecMaterial(query) {
  return request({
    url: '/elec/elecMaterial/list',
    method: 'get',
    params: query
  })
}

// 查询用户下拉框
export function listUserOptions(query) {
  return request({
    url: '/bas/basWarehouse/userOptions',
    method: 'get',
    params: query
  })
}

// 新增物资出库
export function addElecMaterialOutinfo(data) {
  return request({
    url: '/elec/elecMaterialOutinfo',
    method: 'post',
    data: data
  })
}

// 修改物资出库
export function updateElecMaterialOutinfo(data) {
  return request({
    url: '/elec/elecMaterialOutinfo',
    method: 'put',
    data: data
  })
}

// 删除物资出库
export function delElecMaterialOutinfo(outId) {
  return request({
    url: '/elec/elecMaterialOutinfo/' + outId,
    method: 'delete'
  })
}
